home *** CD-ROM | disk | FTP | other *** search
- (*===========================================================================*)
- (* Reverse forward *)
- (* *)
- (* Copyright 1988, 1989, 1990, 1991 by H. Roy Engehausen. All rights *)
- (* reserved. *)
- (* *)
- (*===========================================================================*)
-
- (*===========================================================================*)
- (* Execute reverse forward *)
- (*===========================================================================*)
-
- FUNCTION reverse_forward : BOOLEAN;
-
- VAR
- path_common : path_block;
-
- PROCEDURE ready_exit;
- BEGIN;
-
- window_write(active_tcb^.port_chan_s + '::', 'Reverse forward ended');
- send_message(message_rfwd_done);
- reverse_forward := path_common.path_did_msg;
-
- END;
-
- BEGIN;
-
- {$IFDEF DEBUG_PORT}
- trace_data('RF 1', 0, active_port, '');
- {$ENDIF}
-
- window_write(active_tcb^.port_chan_s + '::', 'Reverse forward started');
-
- FILLCHAR(path_common, SIZEOF(path_common), CHR(0));
-
- WITH path_common DO
- BEGIN;
- path_pattern := active_tcb^.uid_data.user_id;
- path_rev := TRUE;
- path_port_p := '*';
- END;
-
- (*-----------------------------------------------------------------------*)
- (* Mark TCB *)
- (*-----------------------------------------------------------------------*)
-
- active_tcb^.tcb_rev_fwd := TRUE;
-
- (*-----------------------------------------------------------------------*)
- (* Do the routes *)
- (*-----------------------------------------------------------------------*)
-
- {$IFDEF DEBUG_PORT}
- trace_data('RF 2', 0, active_port, '');
- {$ENDIF}
-
- do_route;
-
- (*-----------------------------------------------------------------------*)
- (* Now the path *)
- (*-----------------------------------------------------------------------*)
-
- {$IFDEF DEBUG_PORT}
- trace_data('RF 3', 0, active_port, '');
- {$ENDIF}
-
- IF NOT msg_route_force THEN
- do_path(@path_common);
-
- (*-----------------------------------------------------------------------*)
- (* Clean up our mess *)
- (*-----------------------------------------------------------------------*)
-
- {$IFDEF DEBUG_PORT}
- trace_data('RF 4', 0, active_port, '');
- {$ENDIF}
-
- free_semaphore(semaphore_fwd_route_use);
-
- (*-----------------------------------------------------------------------*)
- (* Make ready to go bye bye *)
- (*-----------------------------------------------------------------------*)
-
- {$IFDEF DEBUG_PORT}
- trace_data('RF 5', 0, active_port, '');
- {$ENDIF}
-
- ready_exit;
-
- END;